Micron Document
πŸŽ–οΈGitΠ―Ρ€Π°πŸŽ–οΈ


Displaying Rendered β€’ View raw β€’ Download

docs/en/developer/codebase.md 936be3998f0fe49f58b8a0f9ff2c01e3cbd85609 (936be399) Text, 3.79 KB

title: Codebase
parent: Developer Guide
nav_order: 2
last_updated: 2026-05-20
aliases:
β€’ repository-layout
β€’ project-structure
β€’ source-code

Codebase

Repository layout, namespacing conventions, and build system overview.

Repository Structure

T282828
Meshtastic-Android/
β”œβ”€β”€ androidApp/ # Android application module
β”‚ β”œβ”€β”€ src/main/ # Shared Android code
β”‚ β”œβ”€β”€ src/google/ # Google Play flavor (Gemini, proprietary)
β”‚ └── src/fdroid/ # F-Droid flavor (FOSS-only)
β”œβ”€β”€ desktopApp/ # Desktop JVM application
β”œβ”€β”€ feature/ # Feature modules (KMP)
β”‚ β”œβ”€β”€ intro/
β”‚ β”œβ”€β”€ messaging/
β”‚ β”œβ”€β”€ connections/
β”‚ β”œβ”€β”€ map/
β”‚ β”œβ”€β”€ node/
β”‚ β”œβ”€β”€ settings/
β”‚ β”œβ”€β”€ firmware/
β”‚ β”œβ”€β”€ docs/
β”‚ β”œβ”€β”€ wifi-provision/
β”‚ └── widget/
β”œβ”€β”€ core/ # Core infrastructure modules (KMP)
β”‚ β”œβ”€β”€ api/
β”‚ β”œβ”€β”€ barcode/
β”‚ β”œβ”€β”€ ble/
β”‚ β”œβ”€β”€ common/
β”‚ β”œβ”€β”€ data/
β”‚ β”œβ”€β”€ database/
β”‚ β”œβ”€β”€ datastore/
β”‚ β”œβ”€β”€ di/
β”‚ β”œβ”€β”€ domain/
β”‚ β”œβ”€β”€ model/
β”‚ β”œβ”€β”€ navigation/
β”‚ β”œβ”€β”€ network/
β”‚ β”œβ”€β”€ nfc/
β”‚ β”œβ”€β”€ prefs/
β”‚ β”œβ”€β”€ proto/
β”‚ β”œβ”€β”€ repository/
β”‚ β”œβ”€β”€ resources/
β”‚ β”œβ”€β”€ service/
β”‚ β”œβ”€β”€ takserver/
β”‚ β”œβ”€β”€ testing/
β”‚ └── ui/
β”œβ”€β”€ build-logic/ # Convention plugins and build helpers
β”‚ β”œβ”€β”€ convention/
β”‚ └── flatpak/
β”œβ”€β”€ docs/ # Documentation source (markdown)
β”‚ β”œβ”€β”€ user/
β”‚ └── developer/
β”œβ”€β”€ gradle/ # Gradle wrapper and version catalog
β”‚ └── libs.versions.toml
β”œβ”€β”€ specs/ # Feature specifications
└── .github/workflows/ # CI/CD workflows

Namespacing Convention

All Kotlin packages follow the pattern:
T282828
org.meshtastic.{layer}.{module}.{subpackage}

Examples:
β€’ T383838org.meshtastic.core.navigation β€” core navigation module
β€’ T383838org.meshtastic.feature.docs.ui β€” docs feature UI package
β€’ T383838org.meshtastic.app.di β€” app DI configuration

Build System

Gradle Kotlin DSL

All build files use Kotlin DSL (T383838.gradle.kts). Configuration:

β€’ Version catalog: T383838gradle/libs.versions.toml
β€’ Convention plugins: T383838build-logic/convention/
β€’ Settings: T383838settings.gradle.kts

Convention Plugins

Located in T383838build-logic/convention/src/main/kotlin/org/meshtastic/buildlogic/:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Plugin β”‚ Purpose β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ T383838meshtastic.kmp.feature β”‚ Standard feature module setup β”‚
β”‚ T383838meshtastic.kmp.jvm.android β”‚ JVM + Android target configuration β”‚
β”‚ T383838meshtastic.kotlinx.serialization β”‚ Serialization plugin setup β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Build Variants (Android)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Flavor β”‚ Description β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ T383838google β”‚ Google Play distribution; includes proprietary APIs β”‚
β”‚ T383838fdroid β”‚ F-Droid distribution; FOSS-only dependencies β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Gradle Tasks

T282828
T8b949e# Compile check across all KMP targets
./gradlew kmpSmokeCompile

T8b949e# Run all tests
./gradlew allTests

T8b949e# Code quality
./gradlew spotlessCheck detekt

T8b949e# Android build
./gradlew assembleGoogleDebug assembleFdroidDebug

T8b949e# Desktop run
./gradlew :desktopApp:run


Version Catalog Highlights

Key dependencies in T383838gradle/libs.versions.toml:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Category β”‚ Library β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Compose β”‚ Compose Multiplatform (JetBrains) β”‚
β”‚ Navigation β”‚ Navigation 3 β”‚
β”‚ DI β”‚ Koin (annotations) β”‚
β”‚ Serialization β”‚ kotlinx.serialization β”‚
β”‚ Database β”‚ Room KMP β”‚
β”‚ Networking β”‚ Ktor β”‚
β”‚ Markdown β”‚ multiplatform-markdown-renderer β”‚
β”‚ Testing β”‚ kotlin-test, compose-ui-test β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜


Served by rngit 1.5.0 - Generated in 0.04s